package com.ilancuo.test;

/**
 * 如果id为正数，则没有任何问题
 * 如果id变为负数，则减法可能会溢出并产生不正确的结果
 */
public class Employee implements Comparable {
    int id;

    @Override
    public int compareTo(Object o) {
        Employee e = (Employee) o;
        return this.id = e.id;
    }
}
